﻿using System.Text;

namespace SimpleORM
{
    public static class ByteArrayExtension
    {
        public static string ToHexString(this byte[] source)
        {
            if (source == null)
                return null;

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < source.Length; i++)
                sb.Append(source[i].ToString("X2"));

            return sb.ToString();
        }
    }
}
